﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Master/Site_InnerWeb.master" AutoEventWireup="false"
    CodeFile="Campaign.aspx.vb" Inherits="private_secure_members_pages_Campaign" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style8
        {
            width: 531px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
        Width="913px">
        <asp:TabPanel runat="server" HeaderText="SMS Campaigns" ID="TabPanel1">
            <ContentTemplate>
                <table id="tableSMS" class="style1">
                    <tr>
                        <td class="style8" valign="top">
                            Campaign Status:<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
                                DataTextField="Name" DataValueField="Id" Width="200px" AutoPostBack="True" 
                                Height="22px">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
                                SelectCommand="usp_lkp_CampaignStatusSelect" SelectCommandType="StoredProcedure">
                            </asp:SqlDataSource>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            <strong>Campaigns By Status</strong>
                        </td>
                        <td>
                            <strong>Entity</strong>
                        </td>
                    </tr>
                    <tr>
                        <td class="style8" valign="top">
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                                AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="SqlDataSource2">
                                <Columns>
                                    <asp:CommandField ShowSelectButton="True" />
                                    <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True"
                                        SortExpression="Id" Visible="False" />
                                    <asp:BoundField DataField="EntityId" HeaderText="EntityId" 
                                        SortExpression="EntityId" Visible="False" />
                                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                                    <asp:BoundField DataField="ScheduleId" HeaderText="ScheduleId" SortExpression="ScheduleId"
                                        Visible="False" />
                                    <asp:BoundField DataField="BudgetId" HeaderText="BudgetId" SortExpression="BudgetId"
                                        Visible="False" />
                                    <asp:BoundField DataField="MessageGroupId" HeaderText="MessageGroupId" 
                                        SortExpression="MessageGroupId" Visible="False" />
                                    <asp:BoundField DataField="Note" HeaderText="Note" SortExpression="Note" />
                                    <asp:BoundField DataField="DateCreated" HeaderText="Date Created" 
                                        SortExpression="DateCreated" />
                                    <asp:CheckBoxField DataField="Active" HeaderText="Active" 
                                        SortExpression="Active" Visible="False" />
                                </Columns>
                            </asp:GridView>
                            <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
                                DeleteCommand="usp_UserCampaignDelete" DeleteCommandType="StoredProcedure" InsertCommand="usp_UserCampaignInsert"
                                InsertCommandType="StoredProcedure" SelectCommand="usp_UserCampaignSelectByEntityIdStatusId"
                                SelectCommandType="StoredProcedure" UpdateCommand="usp_UserCampaignUpdate" UpdateCommandType="StoredProcedure">
                                <DeleteParameters>
                                    <asp:Parameter Name="Id" Type="Int32" />
                                </DeleteParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="EntityId" Type="Int32" />
                                    <asp:Parameter Name="Name" Type="String" />
                                    <asp:Parameter Name="ScheduleId" Type="Int32" />
                                    <asp:Parameter Name="StatusId" Type="Int32" />
                                    <asp:Parameter Name="BudgetId" Type="Int32" />
                                    <asp:Parameter Name="MessageGroupId" Type="Int32" />
                                    <asp:Parameter Name="Note" Type="String" />
                                    <asp:Parameter Name="DateCreated" Type="String" />
                                    <asp:Parameter Name="Active" Type="Boolean" />
                                </InsertParameters>
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="218" Name="EntityId" Type="Int32" />
                                    <asp:ControlParameter ControlID="DropDownList1" Name="StatusId" PropertyName="SelectedValue"
                                        Type="Byte" DefaultValue="1" />
                                </SelectParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="Id" Type="Int32" />
                                    <asp:Parameter Name="EntityId" Type="Int32" />
                                    <asp:Parameter Name="Name" Type="String" />
                                    <asp:Parameter Name="ScheduleId" Type="Int32" />
                                    <asp:Parameter Name="StatusId" Type="Int32" />
                                    <asp:Parameter Name="BudgetId" Type="Int32" />
                                    <asp:Parameter Name="MessageGroupId" Type="Int32" />
                                    <asp:Parameter Name="Note" Type="String" />
                                    <asp:Parameter Name="DateCreated" Type="String" />
                                    <asp:Parameter Name="Active" Type="Boolean" />
                                </UpdateParameters>
                            </asp:SqlDataSource>
                        </td>
                        <td valign="top">
                            <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" 
                                AutoGenerateRows="False" DataKeyNames="ID" DataSourceID="SqlDSEntity">
                                <Fields>
                                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                                        ReadOnly="True" SortExpression="ID" Visible="False" />
                                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                                    <asp:BoundField DataField="CompanyRegNo" HeaderText="CompanyRegNo" 
                                        SortExpression="CompanyRegNo" />
                                    <asp:BoundField DataField="VATRegNo" HeaderText="VATRegNo" 
                                        SortExpression="VATRegNo" />
                                    <asp:BoundField DataField="DateCreated" HeaderText="Date Created" 
                                        SortExpression="DateCreated" />
                                    <asp:BoundField DataField="EntityTypeId" HeaderText="EntityTypeId" 
                                        SortExpression="EntityTypeId" />
                                </Fields>
                            </asp:DetailsView>
                            <asp:SqlDataSource ID="SqlDSEntity" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
                                SelectCommand="usp_EntitySelect" SelectCommandType="StoredProcedure">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="GridView1" DefaultValue="" Name="EntityID" 
                                        PropertyName="SelectedValue" Type="Int32" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <br />
                            <strong>Schedule</strong>
                            <asp:DetailsView ID="DetailsView2" runat="server" Height="50px" Width="125px" 
                                DataSourceID="SqlDSSchedule">
                            </asp:DetailsView>
                            <asp:SqlDataSource ID="SqlDSSchedule" runat="server"></asp:SqlDataSource>
                            <br />
                            <strong>Message(s)</strong>
                            <asp:DetailsView ID="DetailsView3" runat="server" Height="50px" Width="125px">
                            </asp:DetailsView>
                            <br />
                            <strong>Recipients</strong>
                            <asp:DetailsView ID="DetailsView4" runat="server" Height="50px" Width="125px">
                            </asp:DetailsView>
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            <strong>Campaign Delivery Status</strong>
                        </td>
                        <td valign="top">
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel runat="server" HeaderText="Email Campaigns" ID="TabPanel2">
            <ContentTemplate>
                <table id="table1" class="style1">
                    <tr>
                        <td>
                            &nbsp;Campaign Status:
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:TreeView ID="TreeView1" runat="server">
                                <Nodes>
                                    <asp:TreeNode Text="Entity" Value="Entity">
                                        <asp:TreeNode Text="User Campaigns" Value="User Campaign">
                                            <asp:TreeNode Text="List" Value="List">
                                                <asp:TreeNode Text="Filter" Value="Filter">
                                                    <asp:TreeNode Text="Recipients" Value="Recipients"></asp:TreeNode>
                                                </asp:TreeNode>
                                            </asp:TreeNode>
                                            <asp:TreeNode Text="Content" Value="Content"></asp:TreeNode>
                                            <asp:TreeNode Text="Budget" Value="Budget"></asp:TreeNode>
                                            <asp:TreeNode Text="Schedule" Value="Schedule"></asp:TreeNode>
                                            <asp:TreeNode Text="SMS Campaigns" Value="SMS Campaigns">
                                                <asp:TreeNode Text="(All)" Value="(All)"></asp:TreeNode>
                                                <asp:TreeNode Text="New" Value="New"></asp:TreeNode>
                                                <asp:TreeNode Text="Started/Running" Value="Started/Running"></asp:TreeNode>
                                                <asp:TreeNode Text="Stopped/Idle" Value="Stopped/Idle"></asp:TreeNode>
                                                <asp:TreeNode Text="Stopped-Budget Exceeded" Value="Stopped-Budget Exceeded">
                                                </asp:TreeNode>
                                                <asp:TreeNode Text="Disabled" Value="Disabled"></asp:TreeNode>
                                            </asp:TreeNode>
                                            <asp:TreeNode Text="Email Campaigns" Value="Email Campaigns"></asp:TreeNode>
                                        </asp:TreeNode>
                                        <asp:TreeNode Text="Lists" Value="Lists">
                                            <asp:TreeNode Text="Filter" Value="Filter">
                                                <asp:TreeNode Text="Recipients" Value="Recipients"></asp:TreeNode>
                                            </asp:TreeNode>
                                        </asp:TreeNode>
                                        <asp:TreeNode Text="Schedules" Value="Schedules"></asp:TreeNode>
                                        <asp:TreeNode Text="System Message" Value="System Message"></asp:TreeNode>
                                    </asp:TreeNode>
                                </Nodes>
                            </asp:TreeView>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:TabPanel>
    </asp:TabContainer>
</asp:Content>
